Filter hook 'customize_validate_{$setting->id}'

in WP Core File wp-includes/class-wp-customize-manager.php at line 2375

Description

Validates setting values. Validation is skipped for unregistered settings or for values that are already null since they will be skipped anyway. Sanitization is applied to values that pass validation, and values that become null or `WP_Error` after sanitizing are marked invalid. }

Occurrences

Filename Line Number
wp-includes/class-wp-customize-manager.php 2375

Parameters

Type Name Description
array $setting_values Mapping of setting IDs to values to validate and sanitize.
array $options { Options.

PHP Doc

/**
	 * Validates setting values.
	 *
	 * Validation is skipped for unregistered settings or for values that are
	 * already null since they will be skipped anyway. Sanitization is applied
	 * to values that pass validation, and values that become null or `WP_Error`
	 * after sanitizing are marked invalid.
	 *
	 * @since 4.6.0
	 *
	 * @see WP_REST_Request::has_valid_params()
	 * @see WP_Customize_Setting::validate()
	 *
	 * @param array $setting_values Mapping of setting IDs to values to validate and sanitize.
	 * @param array $options {
	 *     Options.
	 *
	 *     @type bool $validate_existence  Whether a setting's existence will be checked.
	 *     @type bool $validate_capability Whether the setting capability will be checked.
	 * }
	 * @return array Mapping of setting IDs to return value of validate method calls, either `true` or `WP_Error`.
	 */